package com.xmu.prcs.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
/**
 * 权限表
 * @author frequent
 *
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "permission", uniqueConstraints = @UniqueConstraint(columnNames = "permissionname"))
public class Permission implements Serializable {

	private Integer idPermission;
	private String permissionName;//权限名
	private String note;//权限介绍
	private Integer type;//权限类型
	private String method;//方法名
	private String menu;//菜单名
	private Integer status;//状态
	
	public Permission(){
		
	}
	
	public Permission(String permissionName, String note, Integer type,
			String method, String menu, Integer status){
		this.permissionName = permissionName;
		this.note = note;
		this.type = type;
		this.method = method;
		this.menu = menu;
		this.status = status;
	}

	@Id
	@GeneratedValue
	@Column(name = "idpermission", unique = true, nullable = true)
	public Integer getIdPermission() {
		return idPermission;
	}

	public void setIdPermission(Integer idPermission) {
		this.idPermission = idPermission;
	}

	@Column(name = "permissionname", length = 20)
	public String getPermissionName() {
		return permissionName;
	}

	public void setPermissionName(String permissionName) {
		this.permissionName = permissionName;
	}

	@Column(name = "note", length = 50)
	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	@Column(name = "type")
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "method", length = 20)
	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	@Column(name = "menu", length = 20)
	public String getMenu() {
		return menu;
	}

	public void setMenu(String menu) {
		this.menu = menu;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
}
